package com.weiyuwqj.server.mapper;

import com.weiyuwqj.api.model.SysArticle;
import com.weiyuwqj.api.model.vo.ArticleVo;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;
@Repository
public interface SysArticleMapper extends Mapper<SysArticle> {

    //后台文章列表
    List<ArticleVo> getListAndPicture(Map map);

    //插入
    Integer insertArticle(SysArticle article);

    //删除
    Integer deleteById(Integer articleId);

    //单个查询
    ArticleVo getSysArticleById(Integer id);

    List<SysArticle> getList(Map map);

    /**
     * 获取最新的一条公告
     * @return 公告
     */
	List<SysArticle> getArticleIndex();
}